package nc.gk.gkxm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import nc.gk.gkxm.model.dto.TopicDto;
import nc.gk.gkxm.model.entity.Topic;
import nc.gk.gkxm.model.vo.PersonlibVo;
import nc.gk.gkxm.model.vo.TopicVO;

import java.util.List;
import java.util.Map;

public interface TopicService extends IService<Topic> {
    public List<TopicVO> getAllTopic() throws Exception;

    /**
     * 插入数据
     * @param topicDto
     */
    public void insertTopic(TopicDto topicDto);

    public List<TopicVO> getAllByTopicId(Integer id);

    List<TopicVO> getAllBySortId(Integer[]  sortIds);

    List<TopicVO> getAllByContent(String content);


    Map<String, String> getAnalyze(Integer topicId);

    Integer getAnswer(TopicDto topicDto);

    void updateTopic(TopicDto topicDto);

    void deletebOptionBytopicId(Integer topicId);

    void deleteByTopicId(Integer topicId);

    PersonlibVo getOneRandomTopic(String token);
}
